/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.oper;

import java.util.List;
import java.util.stream.Stream;

/**
 * <p>Project: app2022 - ForDemo
 * <p>Powered by webrx On 2022-01-08 10:36:31
 *
* @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class ForDemo {
    public static void main(String[] args) {
        int s = 15;
        for (int i = 1; i <= 15; i += 2) System.out.println(" ".repeat(--s).concat("*".repeat(i)));
        for (int i = 13; i > 0; i -= 2) System.out.println(" ".repeat(++s).concat("*".repeat(i)));

        for (int i : List.of(10, 20, 30)) {
            System.out.println(i);
        }
        for (int i : Stream.of(11, 22, 33).toList()) {
            System.out.println(i);
        }
    }
}
